package com.luhuiguo.cms.server.web.filter;

import java.io.IOException;
import java.io.OutputStream;

import javax.servlet.ServletOutputStream;

/**
 * 
 * @author LuHuiguo
 * @version $Id: FilterServletOutputStream.java 144 2010-05-06 05:20:16Z luhuiguo@gmail.com $
 */
public class FilterServletOutputStream extends ServletOutputStream {
    
    private OutputStream stream;

    public FilterServletOutputStream(final OutputStream stream) {
        this.stream = stream;
    }

    /**
     * Writes to the stream.
     */
    @Override
    public void write(final int b) throws IOException {
        stream.write(b);
    }

    /**
     * Writes to the stream.
     */
    @Override
    public void write(final byte[] b) throws IOException {
        stream.write(b);
    }

    /**
     * Writes to the stream.
     */
    @Override
    public void write(final byte[] b, final int off, final int len) throws IOException {
        stream.write(b, off, len);
    }
}
